html {
  box-sizing: border-box;
  font-size: 62.5%;
  line-height: 1.3;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

a,
li,
button {
  color: inherit;
  text-decoration: none;
  list-style: none;
  border: 0;
  outline: 0;
  cursor: pointer;
}

p {
  padding: 0;
  margin: 0;
}

img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

h1,
h2,
h3 {
  padding: 0;
  margin: 0;
}

body {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Nunito", sans-serif;
  background-color: var(--bg-color);
  margin: 0;
}

:root {
  --main-color: #1e90ff;
  --bg-color: #061020;
  --menu-color: #ffffff;
  --focus-color: #133960;
  --red-color: #ff0000;
  --footnote-fz: clamp(1.2rem, 1.4vw, 1.6rem);
  --stack-fz: clamp(1.3rem, 1.4vw, 1.5rem);
  --small-fz: clamp(1.4rem, 1.6vw, 1.8rem);
  --btn-fz: clamp(1.5rem, 1.7vw, 1.9rem);
  --header-fz: clamp(1.6rem, 1.8vw, 2rem);
  --medium-fz: clamp(1.6rem, 1.8vw, 2.2rem);
  --middle-fz: clamp(2.3rem, 3vw, 3.5rem);
  --large-fz: clamp(2.5rem, 3.4vw, 4rem);
  --big-fz: clamp(3rem, 6vw, 7rem);
}

.container {
  width: 100%;
  max-width: 1400px;
  padding: 0 7vw;
  margin: 0 auto;
}

/* header section ______________________________ */
.header__wrapper {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  z-index: 1000;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  font-size: var(--header-fz);
  color: var(--main-color);
}

.logo__phone {
  transition: all 0.5s ease;
  margin-left: 1rem;

  &:hover,
  :active,
  :focus {
    color: var(--menu-color);
    text-decoration: underline;
  }
}

.logo__img-user {
  display: none;
}

.list {
  display: flex;
  gap: 3.7rem;
  padding: 0;
}

.list__item {
  font-size: var(--header-fz);
  color: var(--menu-color);
  transition: all 0.5s ease;

  &:hover {
    color: var(--main-color);
    text-decoration: underline;
  }
}

#menu {
  display: none;
}

label {
  width: 4.3rem;
  height: 4.3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 0.2rem solid var(--main-color);
  border-radius: 0.5rem;
  font-size: 2.7rem;
  color: var(--menu-color);
  cursor: pointer;
  transition: all 0.5s ease;
  display: none;
}

label .fa-times {
  display: none;
}

/* content section ______________________________ */
main {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: space-evenly;
  flex-grow: 1; /* чтобы занимал оставшееся пространство */
  margin-top: 120px;
}

.content {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  margin-bottom: 3rem;
}

.content__box {
  flex: 1 1 60rem;
}

.content__title-hello,
.content__title-ticker,
.content__title-name {
  color: var(--menu-color);
  margin-bottom: 3rem;
}

.content__title-hello,
.content__title-ticker {
  font-size: var(--large-fz);
}

.content__title-name {
  white-space: nowrap;
  font-size: var(--big-fz);
}

.content__text {
  font-size: var(--small-fz);
  color: var(--menu-color);
  text-align: justify;
  text-indent: 20px;
}

.content__text:not(:last-child) {
  margin-bottom: 2rem;
}

.content__typed-text,
.typed-cursor {
  color: var(--main-color);
}

.img-box__photo,
.logo__img-user {
  border-radius: 50%;
  box-shadow: 0 0 20px var(--main-color);
}

/* contacts section ______________________________ */
.contacts {
  display: grid;
  grid-template-columns: 50px minmax(150px, 200px) 50px;
  gap: 2rem;
  justify-content: center;
  justify-items: center;
  align-items: center;
  margin-bottom: 3vh;
}

.contacts__link {
  max-width: 50px;
  max-height: 50px;
  align-items: center;
  border: 0.2rem solid var(--main-color);
  border-radius: 50%;
  transition: all 0.5s ease;
  padding: 0.7rem;

  &:hover,
  :active,
  :focus {
    border-color: var(--bg-color);
    box-shadow: 0 0 20px var(--main-color);
  }
}

.svg {
  padding: 0.3rem;
  transition: all 0.5s ease;

  &:hover,
  :active,
  :focus {
    color: var(--menu-color);
  }
}

.btn {
  display: inline-block;
  font-size: var(--btn-fz);
  font-weight: 600;
  border: 0.2rem solid var(--main-color);
  background-color: transparent;
  border-radius: 0.5rem;
  color: var(--menu-color);
  transition: all 0.5s ease;
  padding: 1.5rem 2rem;

  &:hover {
    border-color: var(--bg-color);
    box-shadow: 0 0 20px var(--main-color);
    color: var(--main-color);
  }

  &:active,
  :focus {
    outline: 1px solid var(--menu-color);
    color: var(--menu-color);
    outline-offset: 3px;
  }
}

.contacts__btn {
  padding: 1.5rem 2rem;
}

.contacts__btn-resume {
  padding: 1.3rem;
}

/* модальное окно для сообщения пользователя */
.modal {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100vh;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: grid;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s, visibility 0.4s;
  z-index: 99998;
}

.modal__box {
  width: 100%;
  z-index: 1;
  background-color: var(--bg-color);
  box-shadow: 0px 0px 17px -7px rgba(34, 60, 80, 0.2);
  border: 3px solid var(--menu-color);
  border-radius: 0.5rem;
  transform: scale(0);
  transition: transform 0.8s;
  padding: 3rem;
  margin: 3rem 0px;
}

.modal.open {
  visibility: visible;
  opacity: 1;
}

.modal.open .modal__box {
  transform: scale(1);
}

/* форма для отправки сообщение на почту */
.form {
  max-width: 60rem;
  width: 100%;
}

.form__title {
  font-size: var(--middle-fz);
  color: var(--menu-color);
  text-align: center;
  margin-bottom: 3rem;
}

.form__box {
  margin-bottom: 3rem;
}

.form__input {
  width: 100%;
  font-size: large;
  border: 1px solid var(--bg-color);
  border-radius: 0.5rem;
  outline: none;
  padding: 1.5rem 1rem;

  &:focus,
  :active {
    outline: var(--bg-color) 2px solid;
  }
}

.just-validate-error-label {
  font-size: 1.3rem;
}

.group-btn {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.form__btn,
.form__btn-close {
  font-size: var(--small-fz);
}

.form__btn-close {
  letter-spacing: 0.06rem;

  &:hover {
    color: var(--red-color);
  }

  &:focus,
  :active {
    outline: 1px solid var(--red-color);
  }
}

/* footer ______________________________ */
footer {
  flex-shrink: 0; /* чтобы footer не уменьшался */
}

.footer__wrapper {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  z-index: 1000;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.footer__footnote {
  color: var(--menu-color);
  font-size: var(--footnote-fz);
  text-align: start;
  margin: 1rem;
}

.footer__counter {
  outline: 0.2rem solid var(--main-color);
  border-radius: 3%;
  padding: 0.3rem;
}

/* media queries ______________________________ */
@media (max-width: 830px) {
  .navbar {
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-color);
    border-top: 0.1rem solid var(--main-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    display: none;
  }

  .navbar ul {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
  }

  .list__item {
    font-size: var(--large-fz);
    padding: 10px;
  }

  label {
    display: block;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #menu:checked ~ .navbar {
    display: block;
  }

  #menu:checked ~ label .fa-bars {
    display: none;
  }

  #menu:checked ~ label .fa-times {
    display: block;
  }
}

@media (max-width: 600px) {
  .logo__img {
    display: none;
  }

  .logo__img-user {
    max-width: 70px;
    max-height: 70px;
    display: block;
  }

  .logo__img-photo {
    border-radius: 50%;
  }

  .img-box__photo {
    display: none;
  }

  .content {
    gap: unset;
  }

  .content__box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* .contacts {
    grid-template-columns: 50px 170px 50px;
  } */
}

@media (max-width: 400px) {
  .logo__img-user {
    max-width: 50px;
    max-height: 50px;
  }

  .logo__click {
    display: none;
  }

  /* .contacts {
    grid-template-columns: 50px 150px 50px;
  } */

  .contacts__btn {
    padding: 1.5rem;
  }

  .contacts__btn-resume {
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 338px) {
  .contacts {
    grid-template-columns: 50px 130px 50px;
    gap: 1rem;
  }

  .svg {
    width: 24px;
    height: 24px;
  }

  .contacts__btn {
    padding: 1rem;
  }

  .contacts__btn-resume {
    padding: 1rem 0.5rem;
  }
}
